home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nautilus 1993 August
/
Nautilus CD Magazine Volume 3-8 August 1993 Windows Edition.mdf
/
games
/
rse
/
otto15.exe
/
OTTO.DOC
< prev
next >
Wrap
Text File
|
1993-07-08
|
28KB
|
671 lines
╔══════════════════════╗
║ Welcome to Otto! ║
║ Ver 1.5 7/08/93 ║
║ (c) 1993 RSE Inc ║
╚══════════════════════╝
Otto lets you automate a wide variety of tasks. I created it to help me
take advantage of Compuserve's new basic features but it can be used for
virtually anything.
If you use "Autosig" as your communications program you can see for
yourself what Otto can do. Use any ASCII editor to edit the first few
lines of "DOALL" to reflect what subdirectory AUTOSIG.EXE resides in.
Then enter "otto doall" at the DOS prompt. (If for any reason you want
to abort the process press both shift keys at the same time) Otto will
send out your e-mail (if you have any), gather your e-mail, get some
stock quotes, get the latest news and sport scores, download some weather
maps, and get the latest weather forecast. And Otto can do all this
unattended at 5 AM so its all waiting for you when you wake up!
Although this "DOALL" script only works for users of "Autosig", later on
we will discuss how you can modify "DOALL" to work with your
communications program. And of course we will discuss how you can create
your own scripts thereby automating virtually any task!
The bad news is Otto uses scripts. If you've tried writing scripts
before you know what a pain it can be. The *good* news is that Otto has
just a few simple script commands making it very easy to learn and use.
The *GREAT* news is that Otto also has a script recorder that creates
scripts on the fly as you go about doing the task you want to automate!
It records what you're doing as you're doing it. Once Otto creates the
script you can go back and edit it to make any desired changes. Sure
beats trying to create scripts from scratch.
Some of you may be familiar with our "Playback" program which is also a
task automator. Playback records your keystrokes with the delays intact
and lets you turn these "keyfiles" into small .COM programs. You can
playback they keyfiles via hot key, from the DOS prompt, from the MENU
program or at some specified times. The MENU program also lets you add
notes to your keyfiles, adjust their playback, edit them and much more.
But the point is Playback makes it's decisions on when to stuff
keystrokes based on the delays between keystrokes.
On the other hand, Otto bases its decisions primarily on what appears on
the screen. This is good for situations where the delays between
keyboard inputs may vary from use to use (like using your modem). On the
other hand, since you can only read text from a text screen, Otto works
best when the application you're using is text based and not graphics
based. On the plus side, Otto can incorporate decision making whereas
Playback can't. For example if you try to log-on but the line is busy,
Otto can have the program re-dial instead of pressing ahead as tho the
connection had been made. If Otto doesn't fit your needs chances are
Playback will. You can find Playback in Library 3 of Compuserve's IBMSYS
forum with the name PB??.EXE with ?? being the latest version number.
== How Much? ==
Otto is shareware. As such you are given the program without obligation
in order to evaluate it. If after a 3 week evaluation you decide to
continue using it then you are obligated to become a registered user.
You register by sending $30 + $1 shipping (add $1 for 3.5 disk,
$5 for overseas orders) to:
Otto │ Visa or MC customers: │ Modem-It! to:
1157 57th Drive SE │ call or FAX (206) 939-4105 │ (206) 939-2312
Auburn, WA 98002 │ Compuserve: 72371,1557 │ Product ID: OT
(Modem-It! (tm) is a free program that lets you use your modem to easily
place orders 24 hours a day with any participating merchant. Look for it
on any bulletin board.)
As a registered user you'll get the following additional benefits:
1. Technical support and the latest version of Otto.
2. The unregistered versions of some of our other shareware
programs including Playback, Nabbit, FileNotes, Remind Me!,
Trash-It, BriteLine, and others.
3. No more "please register" messages.
Because Otto is shareware you're encouraged to give copies of it to
others as long as you don't modify the program or these instructions and
you don't charge for the copies. The only exception to the last rule is
for shareware vendors who may charge a reasonable distribution fee.
Those using Playback in a commercial or educational environment must
register. Site licenses are available, as well as quantity discounts.
== Getting Started ==
* Put OTTO.COM in one of the subdirectories listed in the PATH statement in
your AUTOEXEC.BAT file.
=== Creating your own scripts ===
== Definitions: ===
The following symbols are used in the format description of the various
commands:
{alt-3} This signifies the character that appears when you hold
down the Alt key and press three. Don't put the brackets
or the description in your scripts, just the character
that appears when you press the keys within the { } at
the same time.
[message] specifies data that appears on the screen. Must be
enclosed quotes.
[delay] delay in seconds
[evaluator] must be either "=" or "<>"
[label] specifies a location in the script. Must be less than
eight characters long and be enclosed within "*"s. For
example: *GetMail*
[location] You tell Otto where on the screen to look for a message
in a variety of ways. If you specify "cursor" then Otto
looks for the message directly in front of the cursor. For example if
your screen looks like this:
Enter Name: _
then the cursor message could be "Enter Name: ", "Name: ", ": ", or even
" ". Notice I always included the space right in front of the cursor.
Therefore the command:
waitfor cursor "Name: "
would wait until "name: "appears directly before the cursor. The
uppercase/lowercase status of the message is irrelevant as the "message"
comparison is case insensitive.
You can also specify the message location by screen location. Enclose
the coordinates in ROW,COLUMN format within (). For example:
waitfor (4,0) "City: "
would wait until "City: " appears at row 4, column 0.
Both rows and columns begin at 0, therefore the upper left corner of the
screen would be (0,0). If you're more comfortable using COLUMN, ROW
than ROW, COLUMN then use DEBUG to change byte 0F hex of OTTO.COM to a
value of 1.
You can also specify message location in offsets from the cursor
location. You do this by specifying + or - for values that are to be
cursor offsets. For example:
waitfor (-1,+2) "message"
would wait until "message" appeared at cursor row -1 and cursor column
+2. You MUST use a + or - to signify an offset. Let's say you want to
specify the message location as the same column as the cursor but two
rows up. You would use (-2,+0). If you used (-2,0) then Otto would look
two rows up but at column 0 since the lack of a + or - on the 0
signifies the 0 is an absolute location. Make sure you understand the
following examples:
(3,1) Row 3, Column 1
(0,-3) Row 0, Cursor column-3
(+0,-3) Cursor row, Cursor column-3
(-1,-2) Cursor row-1, Cursor column-2
(+2,3) Cursor row+2, Column 3
== Some ground rules ==
* Otto only looks at the first letter of each command. Therefore the
command: waitfor cursor "message"
could be abbreviated to: w c "message"
* You must leave a space between each component of the message:
w c "message" ;would be correct
wc "message" ;would generate an error.
* Use only one command per line, except for " ; " which allows you to add
comments to your scripts.
The following are the script commands. Hopefully between the
explanations, examples, and sample scripts you can figure out what's
going on.
} WAITFOR Format: waitfor [location] [message]
waitfor [delay]
Waits for a condition to be met. The condition can be either a delay
(specified in seconds) or a "message" match.
Examples:
waitfor cursor "message" ;wait until "message" appears directly
;before cursor
waitfor (0,3) "message" ;wait until "message" appears at Row 0, Col 3
waitfor (-2,+0) "message" ;wait until "message" appears at cursor row-2
;and cursor column
waitfor 2.5 ;wait for 2.5 seconds
} IF/THEN Format: if [location] [evaluator] [message] then *label*
If the conditions are met Otto jumps to the line after *label*.
The "then" portion is optional. "<>" means not equal.
Examples:
if cursor = "message" then *GetMail*
if (0,3) = "message" then *GetStock*
if (-2,+0) <> "message" then *GetNews*
} JUMP Format: jump *label*
Jumps to the line following *label*.
Example: jump *GetMail* ;jumps to line after *GetMail* line
} GOSUB Format: gosub *label*
Goes to *label* but returns when "return" is encountered.
Example: gosub *getmail*
} RETURN Format: return
Returns from a gosub routine. In other words, returns to the line after
the line that "gosub"ed to this routine.
} CALL Format: call "script"
Runs the script file specified. When that script ends then Otto returns
to the next line of this (the calling) script.
} END Format: End
MUST be used to signal the end of a script.
} ; Format: ;
Used to add comments to your scripts. Otto ignores everything after the
semicolon.
} {alt-233} = [data filename]
You can have OTTO get inputs from an external data file. This command
specifies which file LINEINPUT should get its data from. You can
specify the entire pathname if you desire. This command must be prior
to any LINEINPUT commands. See LINEINPUT for details on the structure of
the data file.
} LINEINPUT Format: LINEINPUT
This inputs the next line of data from the data file and puts it into the
{alt-233} variable. Data in the data file must be separated by carriage
returns. In other words a data file might look like this:
Bill Bailey
Carol Channing
Mark Blaine
Steve Crawford
Karen Comet
The first time you used LINEINPUT it would input "Bill Bailey", the
second time would be "Carol Channing", and so on. LINEINPUT just reads
in the data. To stuff the data you must use the "{alt-233}" command
} "{alt-233}"
Stuffs the data read by the last LINEINPUT command. The {alt-233} must
be by itself within the quotes. That means that if you want a carriage
return you'll need to put it on a separate line like this:
"{alt-233}"
"|"
} FOR Format: FOR [# of times to do for /next loop] or {alt-233}
NEXT Format: NEXT
FOR is used to signify the start of a loop. NEXT defines the end of the
loop. You enter the number of times you want the functions within the
loop to be executed in the FOR command. Let's say you want to stuff
"Hello" five times with a 2 second pause after each time:
FOR 5 ;start of loop, loop 5 times
"Hello|"
wait 2
NEXT ;end of loop
The functions that fall between the FOR and NEXT commands are performed
the number of times specified in the FOR command.
If you have specified a data file ( {alt-233} = [filename] ) then you can
use {alt-233} as the number of times to loop. This causes the FOR / NEXT
loop to continue until the end of the data file is reached.
This example shows you how you can read and stuff all the data within a
data file:
{alt-233} = INPUT.DAT ;specifies data file
FOR {alt-233} ;loop until end of data file
LINEINPUT ;read in next data
"{alt-233}" ;stuff the data
"|" ;carraige return
NEXT ;end of loop
END
You can nest loops within each other as long as you don't exceed 5
levels.
} Stuffing keystrokes Format: "keystrokes"
Takes the keystrokes enclosed within quotes and stuffs them into the
keyboard. Use | to specify a carriage return. Characters after the |
(carriage return) will be ignored so put them on a new line.
Examples:
"scott chaney" stuffs "scott chaney" with no carriage return
"go mail|" stuffs "go mail" and follows with carriage return
"{alt-232}14 hello{alt-232}15 {alt-232}15 world|" PgDn "hello"
RtArw RtArw "world" carriage return. See below.
You can add special keys like Escape, the function keys, the cursor
keys, and others, into your scripts by using a special notation. The
process for inserting a special key is:
* Hold down the Alt Key
* enter 232 on the numeric keypad
* release the Alt key
* enter the number of the special key as indicated in the following table
* follow your input with a space
Alt-232 with be represented by {alt-232} in these instructions.
== Special Character Table ==
We have moved the special character table to the end of this file because
on some printers the last few characters in the table were being
interpeted as printer codes and were changing such things as spacing and
typestyle. While this wasn't causing any harm it did confuse, annoy,
and alarm some people.
== Shift States ==
There may be times when special keys are not enough. Some programs don't
look for the special keys when looking for Ctrl and/or Alt key
combinations. Instead they examine a "shift status" byte in memory that
tells them if the Ctrl and/or Alt keys are being pressed. Then they look
in the buffer to see which key has been pressed with it. In these cases
they won't act on the special keys unless the "shift status" byte signals
that Ctrl and/or Alt have been pressed. Therefore Otto lets you change
this "shift status" byte. To change the shift status byte:
1. Press Alt and while holding it down enter 212 on the numeric keypad.
We will use {alt-212} to represent the value that results.
2. Then enter 1 for Alt, 2 for Ctrl, and 3 for Ctrl and Alt. Use 0 to
set things back to normal.
3. Follow your input with a space.
IMPORTANT: Make sure you always reset the "shift status" byte back to 0
when you're done by using: {alt-212}0
Example: "{alt-212)3 D{alt-212}0 " would simulate Ctrl-Alt-D being
pressed.
In the above example "{alt-212}3 " signals Ctrl and Alt both being
pressed, then the D key is entered, then the shift state is reset using
"{alt-212}0 ".
=== Ctrl-A thru Ctrl-Z ===
The keys Ctrl-A thru Ctrl-Z have the ASCII equivalents of {alt-1} for
Ctrl-A up to {alt-26} for Ctrl-Z. Some programs will react correctly just
to these characters, while others may examine the shift status byte too.
Let's say you want to put Ctrl-D in your script. Here are the options
you could use:
"{alt-4}"
"{alt-212}1 {alt-4}{alt-212}0 " ;has the best chance of working
"{alt-212}1 D{alt-212}0 "
=== Recording a script ===
You could create your own scripts from scratch, but it's a lot easier to
have Otto record a script for you. Then you need only go in and massage
a few items in order to get it to run correctly.
* To record a script run Otto using the "/r" command line switch.
Example: Otto new1 /r
* To start recording press Ctrl-LShft-RShft. You'll hear an ascending
series of tones which indicate the recording has begun.
* To stop recording press Ctrl-LShft-RShft again. You'll hear a
descending series of tones indicating the recording has stopped.
You may stop a recording and then start it again. If you do, the new
recording will be appended to the end of the previous recording.
A new line is created in the script file every time the Enter key is
pressed -or- whenever a delay between keystrokes exceeds 3 seconds.
Therefore on single key inputs (like pressing Y or N for a Yes/No
response) it's best to wait three seconds before pressing the key.
Chances are your recorded scripts won't run correctly until you "massage"
them a little. The reason is that Otto doesn't know what's important and
what isn't. He always assumes that the cursor message is the critical
item. Often it's not. In addition, at times there are critical delays
that are important. Otto won't pick up on those either. Here are some
hints for getting your scripts to run correctly:
* Before you do anything print out your script so you can follow along as
it replays and you can see where it is hanging up.
* Check the "waitfor cursor" messages to see if they are what Otto should
be waiting for. It may well be that Otto should be waiting for a message
that appears elsewhere on the screen.
* Otto doesn't record delays between inputs, so check the script to see
if there are any delays you need to insert between keystrokes or inputs.
* If your Escapes and/or Backspaces aren't working correctly then you may
want to subsitute "{alt-232}53 " for {alt-27} (Escape) or "{alt-232}52 "
for {alt-8} (backspace).
* And lastly, make sure a new "waitfor" line is created whenever you need
one. Remember, a new "waitfor" line is only created when you press the
Enter key or the delay between keystrokes exceeds 3 seconds. That's why
for those single key inputs (function keys, cursor keys, Y/N responses,
etc..) where you want "waitfor" lines generated you need to wait three
seconds before pushing the key.
=== Running a script ===
To begin running a script:
* enter "OTTO filename" where "filename" is the name of the script file
you want to run.
NOTE: All script files must be in the same subdirectory as OTTO.COM.
== Aborting the running of a script ==
You can abort the running of a script by pressing the Ctrl key, Left
Shift key and the Right Shift key at the same time.
== Hot key activation ==
There may be times when you don't want the script to begin immediately
but would like it to start when you press a hot key. You do this by
using the "/h" command line option when you start the program. For
example, entering "otto store /h" tells Otto not to begin stuffing the
STORE file until you press the hot key. The hot key is: Ctrl-LShift-
RShift. When you press Ctrl-RShf-LShf a menu will pop-up showing all
the scripts you've hot-keyed. Select the script you want to run by
pressing the letter displayed to the left of the script's name. Press
Escape to exit without selecting a script. You can put up to 10 scripts
in the hot key buffer.
Pressing Ctrl-LShf-RShf will cause any scripts in progress to end.
== Time activated scripts ==
If you'd like the running of your script to begin automatically at some
later time you use the command line option "/####" where #### is a four
digit number designating the time you want the stuffing to begin. The
#### must be in 24 hour military time (3am = 0300, 11:30pm = 2330) and
MUST be 4 digits long. For example, entering "otto doall /0200" would
cause the "DOALL" script to begin activating automatically at 2am.
== Key stuffing speed ==
Normally Otto stuffs keys at the rather slow pace of 18 characters a
second. The reason is that some programs take keystrokes out of the
buffer faster that they can use them (go figure?) and this "slow" speed
may give them time to catch up before the next keystroke comes.
However, if you live on the wild side you might want to stuff the
keystrokes in faster. You do this by using the "/f" (f for fast) command
line option. Otto will then stuff the keystokes in at about 145
characters a second.
== Batch file operation ==
If you want to run an OTTO script from a batch file, and you want the
batch file to wait until the script is done before continuing, you MUST
use the "/b" command line option and your script MUST end at the DOS
prompt.
Format: OTTO filename /b Example: otto doall /b
== Uninstalling Otto ==
Otto is a small TSR that uses less than 9K of RAM. Once you run it,
this 9K portion of the program remains in memory until you re-boot or
uninstall it using the "/u" command line option. In other words, to
uninstall Otto enter "otto /u" at the DOS prompt. You MUST remove TSR's
in the reverse order in which they were loaded or you may lock up your
computer, thus requiring a re-boot.
== The script display line ==
You'll notice that when you run your scripts Otto often displays the
current script line in the upper right corner of the screen. This can be
invaluable when it comes time for you to check out your scripts. Only
"waitfor" commands are displayed. Otto acts upon all the other commands
so fast that you wouldn't see them even if they were displayed. Because
many programs use the top row of the display for menu selections we
elected to have Otto display the script lines on the second row.
You can turn off the script display by using the "/w" command line
option.
== Sample Scripts ==
The following sample scripts have been supplied for your use: DOALL,
GETNEWS, GETSTOCK, GETMAP, and WEATHER. Users of "Autosig" will only
have to make small changes to get them to work correctly. If you use
another communications program then you'll need to make some more
changes, primarily concerning how downloads are initiated and concluded.
I've put notes in the script files indicating what sections are "Autosig"
unique and will need changing.
By the way, "Autosig" is a great program that excels in handling e-mail
and forum message traffic. If your communications program doesn't
automate e-mail operations then you'll definitely want to get your hands
on "Autosig". You can find it in the "AUTOSIG" library of the IMBCOM
forum on Compuserve. And the best part? The program is free, therefore
your only cost will be the cost of downloading it.
The script files can be a real aid in learning how to use the script
commands. You might want to evaluate them until you can understand
exactly what is going on.
== Help ==
If you forget any of Otto's command line options, just enter "otto /?" at
the DOS prompt and Otto will provide you with a summary.
== POS ==
We've included a small TSR program to help you determine the location of
items on your screen. Just enter POS at the DOS prompt. When you press
Ctrl-F10 the cursor will move to the middle of the screen and the cusor
location will appear in the upper left corner. You can move the cursor
using the cursor keys. Exit by pressing Escape.
== Colors ==
The offset of the Error message color byte within OTTO.COM is 0Dh. The
byte that controls the color of the script window and pop-up list is 0Eh.
== Problems ==
"Your scripts don't run on my computer" The scripts are designed for
users of "Autosig" and even then will need some minor modifications to
run correctly. However, all these differences are specified within the
scripts themselves, making it easy for you to make the changes necessary
to have them run with your communications program.
"I just recorded a script and it doesn't run correctly." Try replacing
the Escape and/or backspace characters with their special character
equivalents [Esc:change {alt-27} to {alt-232}53 ,BS:change {alt 8} to
{alt-232}52 ].
"My scripts still don't work" Check the ground rules mentioned at the
start of the script command descriptions. In addition, triple check all
your syntax and make sure everything is in accordance with the rules
specified. For programmers it is often habit to use commands or command
syntax that is not correct for Otto. For example, there is a tendency to
end an IF/THEN command with another command instead of a label.
== Technical Support ==
Registered users can call (206) 939-4105 for technical support or contact
us on CIS: 72371,1557
Software design is an evolutionary process. A good program is always
being updated to correct bugs and add new features. If you'd like to
tell us how we could make Otto better please send us a letter or e-mail.
Although we can't respond personally to your letters I do guarantee your
suggestions will be seriously considered.
== Thanks ==
Thank you for your time. I hope you find Otto helpful and worthy of your
support.
== Legal ==
Otto is copyrighted 1992-93 by RSE Inc. "Otto" is an unregistered
trademark of RSE Inc.
RSE Inc. specifically disclaims all warranties pertaining to this
software. The software is released "as is".
== Distributing Otto Scripts ==
You can freely distribute your Otto scripts to others. Of course they
won't run unless the end user also has Otto. If you decide to distribute
Otto with your scripts then you must distribute the unregistered version
and make clear to the end user that they must register Otto if they
continue to use your scripts.
Registering Otto DOES NOT give you permission to distribute the
registered version to others. Registration covers a single user. If you
have multiple users within a single site that will be using the scripts
then you'll need a site license. Call Scott Chaney at (206) 939-4105 for
details.
In addition, we have a program that converts your scripts to autonomous
.COM files that don't require Otto to execute. For a $495 license fee we
will supply you with the conversion program, a registered copy of Otto,
and a license that grants you unlimited distribution rights for all of
your converted scripts. Contact Scott Chaney at (206) 939-4105.
== Special Character Table ==
To enter a special character: Enter Alt-232, enter the character # (as
derived from this table) and follow the input with a space. See
examples at the end of this table.
Normal Ctrl Alt Shift │ Alt Alt Alt
F1 1 21 41 61 │ 1 71 A 83 N 96
F2 2 22 42 62 │ 2 72 B 84 O 97
F3 3 23 43 63 │ 3 73 C 85 P 98
F4 4 24 44 64 │ 4 74 D 86 Q 99
F5 5 25 45 65 │ 5 75 E 87 R 100
F6 6 26 46 66 │ 6 76 F 88 S 101
F7 7 27 47 67 │ 7 77 G 89 T 102
F8 8 28 48 68 │ 8 78 H 90 U 103
F9 9 29 49 69 │ 9 79 I 91 V 104
F10 10 30 50 70 │ 0 80 J 92 W 105
│ - 81 K 93 X 106
Home 11 31 │ = 82 L 94 Y 107
End 12 32 │ M 95 Z 108
PgUp 13 33
PgDn 14 34
RtArw 15 35
LfArw 16 36
UpArw 17
DnArw 18
Ins 19
Del 20
Tab 51 60
BS 52 ;also try non-special character (Alt 8)
Esc 53 ;also try non-special character (Alt 27)
Print Screen 37
Examples: Alt-F3 = "{alt-232}43 " Ctrl-PgDn = "{alt-232}34 "
Alt-J = "{alt-232}92 " Print Screen = "{alt-232}37 "
Backspace: "{alt-232}52" or "{alt-8}"
Escape: "{alt-232}53" or "{alt-27}"
Ctrl-A: "{alt-212}1 A{alt-212}0 " or "{alt-1}"